﻿using System.Collections.Generic;
using NHibernate.Criterion;

namespace MinistryManager.DataAccess.Services.NHibernate
{
    public interface IDataModel
    {
        IList<T> GetByCriterion<T>(List<ICriterion> criterion) where T : class;
        void InsertOrUpdate<T>(T target, int id) where T : class;
        void InsertOrUpdate<T>(List<T> list) where T : class;
        void Delete<T>(List<T> list) where T : class;
        T GetById<T>(int id);
        IList<T> GetAll<T>() where T : class;
        IList<T> GetAll<T>(string orderBy, bool asc) where T : class;
    }
}
